package user;

import book.BookList;
import operation.*;

import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: YKH
 * Date: 2022-04-17
 * Time: 8:54
 */
public class AdminUser extends User{

    public AdminUser(String name) {
        super(name);
        this.dooperation = new Operation[]{
                new ExitOperation(),
                new AddOperation(),
                new DeleteOperation(),
                new DisplayOperation(),
                new SearchOperation()
        };
    }

    @Override
    public int menu() {
        System.out.println("==========管理员菜单=========");
        System.out.println("1. 添加书籍");
        System.out.println("2. 删除书籍");
        System.out.println("3. 显示书籍");
        System.out.println("4. 查找书籍");
        System.out.println("0. 退出系统");
        Scanner scan = new Scanner(System.in);
        System.out.println("请选择操作：");
        int choice = scan.nextInt();
        return choice;
    }
}
